<template>
  <div id="app">
    <router-view v-if="isRouterAlive" :key="key"/>
  </div>
</template>
<script>
	import { removeStorage } from '@/utils/auth'
	export default {
		name: 'App',
		data(){
			return{
				isRouterAlive:true
			}
		},
		computed: {
			key() {
				return this.$route.path
			}
		},
		provide(){
			return{
				reload:this.reload
			}
		},
		methods:{
			reload(){
				removeStorage('orderId')
				this.isRouterAlive = false
				this.$nextTick(()=>{
					this.isRouterAlive = true
				})
			}
		}
	}
</script>

<style lang="scss">
</style>
